<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// Banner模块
Route::get('api/banner/:id', 'api/Banner/getBanner'); // 获取指定id的Banner信息


// Theme主题模块
Route::get('api/theme/detail/:themeId', 'api/Theme/getThemeDetail');
Route::get('api/theme', 'api/Theme/getThemeList');


// Product商品模块
Route::get('api/product/getList', 'api/Product/getList');
Route::get('api/product/byCategory/:categoryId', 'api/Product/getAllByCategory');
Route::get('api/product/detail/:productId', 'api/Product/detail');

// Category分类模块
Route::get('api/category/all','api/Category/getAllCategory');


// Token
Route::post('api/token/user', 'api/Token/getUserToken');

// Address
Route::post('api/address/edit','api/Address/edit');

// Order
Route::post('api/order/placeOrder','api/Order/placeOrder');  // 下单接口
Route::get('api/order/userOlist','api/Order/getListByUser');  // 用户订单列表接口

// Pay
Route::post('api/pay/preOrder','api/Pay/getPreOrder');  // 生成预订单接口


